package cn.cjxy.springboot_mybatis01.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

@Data
@AllArgsConstructor
@ToString
public class Emp {
    private Integer id;
    private String name;
    private Integer age;
    private String addr;
    private Double salary;
    private Integer dept_id;
    //一个员工对应一个部门
    private Dept dept;

    public Emp() {
    }

    public Emp(Integer id, String name, Integer age, String addr, Double salary, Integer dept_id) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.addr = addr;
        this.salary = salary;
        this.dept_id = dept_id;
    }
}
